#!/bin/bash

# IPs
IP="10.31.17.134"
BROADCAST="10.31.17.255"

# DIRECCIONES DE RED
acaraguay="10.31.17.0"
uruguari="10.31.17.64"
iguazu="10.97.5.0"


# DIRECCIONES DE GATEWAYS
H105="10.31.17.132"
H108="10.31.17.133"

# MASCARAS DE RED
Netmask24="255.255.255.0"
Netmask25="255.255.255.128"
Netmask26="255.255.255.192"
Netmask27="255.255.255.224"
Netmask28="255.255.255.240"
Netmask29="255.255.255.248"
Netmask30="255.255.255.252"

./limpiezaInterfaces.sh
interfaz=`ifconfig | egrep "eth." -o | head -1`

ifconfig $interfaz $IP broadcast $BROADCAST netmask $Netmask25 

route add -net $acaraguay netmask $Netmask26 dev $interfaz gw $H105
route add -net $uruguari netmask $Netmask27 dev $interfaz gw $H105 
route add -net $iguazu netmask $Netmask24 dev $interfaz gw $H105 
route add -net 0.0.0.0 netmask 0.0.0.0 dev $interfaz gw $H108


#	./DNSresto.sh
